package file.a03;

import java.io.StringWriter;

public class StringWriterTest {
    public static void main(String[] args) {
        try(StringWriter sw=new StringWriter()){
            sw.write("hahah\n");
            sw.write("爱好");
            System.out.println(sw.toString());
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
